Component({
  /**
   * 组件的属性列表
   */
  properties: {
    show: {
      type: Boolean,
      value: ''
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    reason:'',
    imageFiles:[]
  },
  ready() {

  },
  /**
   * 组件的方法列表
   */
  methods: {
    closeReason() {
      this.triggerEvent('close')
    },
    sendUp() {
      let images = []
      let list = this.data.imageFiles || []
      if(list.length){
        list.forEach((item,index)=>{
          images.push(item.url)
        })
      }
      this.triggerEvent('send',{
        reason: this.data.reason,
        pic: images.toString()
      })
    },
    getUploaderList(e){
      this.setData({
        imageFiles: e.detail.uploaderList
      })
    },
     // 输入框操作
     inputWrite(e) {
        this.setData({
          reason: e.detail.value
        })
    },
  }
})